package com.itheima.model.user.pojos;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.mongodb.core.mapping.Field;

import java.io.Serializable;
import java.util.List;

/**
 * <p>
 * 签到信息表
 * </p>
 *
 * @author itheima
 */
@Data
@Builder
@Document(collection = "tb_sign") // 指定MongoDB集合名称
@NoArgsConstructor
@AllArgsConstructor
public class Sign implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * MongoDB自动生成的主键ID
     */
    @Id
    private String id;

    /**
     * 用户ID
     */
    @Field("user_id")
    private Integer userId;

    /**
     * 签到持续天数
     */
    @Field("continuous_days")
    private Integer continuousDays;

    /**
     * 已签到日期列表（格式：yyyy-MM-dd）
     */
    @Field("signed_dates")
    private List<String> signedDates;

    /**
     * 累计积分
     */
    @Field("points")
    private Integer points;

}